<!DOCTYPE html>
<html>
<head>
    <title>管理员列表</title>
    <#include "../resource.ftl"/>
    <script type="text/javascript" src="/modules/user/js/list.js"></script>
</head>
<body>
<form class="layui-form " action="">
    <div class="layui-form-item">
        <label class="layui-form-label">用户名</label>
        <div class="layui-input-inline">
            <input type="text" name="usernameVague" placeholder="请输入用户名" class="layui-input">
        </div>

        <label class="layui-form-label">姓名</label>
        <div class="layui-input-inline">
            <input type="text" name="nickNameVague" placeholder="请输入姓名" class="layui-input">
        </div>


        <div class="layui-input-normal search-btn-group">
            <button class="layui-btn" lay-submit="" lay-filter="moreSearch" >
                <i class="fa fa-chevron-down">&nbsp;</i>更多
            </button>
            <button class="layui-btn layui-btn-normal search-btn" table-id="sysUserTable"
                    lay-submit="" lay-filter="search">
                <i  class="fa fa-search">&nbsp;</i>查询
            </button>
            <button type="reset" class="layui-btn layui-btn-primary"><i class="fa fa-refresh">&nbsp;</i>重置</button>
        </div>
    </div>

    <div class="layui-form-item more-search">
        <label class="layui-form-label">手机号</label>
        <div class="layui-input-inline">
            <input type="text" name="mobileVague" placeholder="请输入手机号" class="layui-input">
        </div>

        <label class="layui-form-label">状态</label>
        <div cyType="selectTool" cyProps="enumName:'StateEnum'" name="status" class="layui-input-inline"></div>


    </div>

    <div class="layui-form-item more-search">

        <label class="layui-form-label">所属部门</label>
        <div class="layui-input-inline">
            <input id="orgId" cyType="treeTool" cyProps="url:'/organize/select',name:'orgId'"
                   placeholder="请选择所属部门" class="layui-input"/>
        </div>

        <label class="layui-form-label">所属角色</label>
        <div cyType="selectTool" cyProps="url:'/sys/role/findAll'"
             name="roleIdVague" class="layui-input-inline"></div>

    </div>

</form>
<div class="layui-btn-group">
    <button class="layui-btn layui-btn-normal" onclick="initPassword('sysUserTable','/sys/user/initPassword');" >
        <i class="fa fa-refresh">&nbsp;</i>初始化密码
    </button>

</div>
<div class="layui-form ">
    <table class="layui-table" lay-data="{height:471, url:'/sys/user/listData/', page:true, id:'sysUserTable'}" lay-filter="sysUserTable">
        <thead>
        <tr>
            <!--复选框-->
            <th  lay-data="{type:'checkbox'}"></th>
            <th  lay-data="{field:'username',render:'Custom.name'}">用户名</th>
            <th  lay-data="{field:'nickName'}">姓名</th>
            <th  lay-data="{field:'headPic',render:'Custom.img'}">头像</th>
            <th  lay-data="{field:'orgName'}">所属部门</th>
            <th  lay-data="{field:'roleId'}">所属角色</th>
            <th  lay-data="{field:'mobile'}">手机号</th>
            <!--isPrimary：渲染列-->
            <th lay-data="{field:'status',render:'Custom.status'}">状态</th>
            <th lay-data="{fixed: 'right', width:179, align:'center',render:'Custom.bar'}">操作列</th>
        </tr>
        </thead>
    </table>
</div>
<script>
    $(document).ready(function () {
        layui.use('table', function () {
            var table = layui.table;
            //转换静态表格
            table.init('sysUserTable');
        });
    });
</script>
</body>
</html>